package com.xinqi.utils.poolutils;

import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author xin麒
 * @date 2023/8/11 22:59
 */
@Component
public class XinJdkPoolExecutor extends ThreadPoolExecutor{
    public XinJdkPoolExecutor() {
        super(1, 2, 0, TimeUnit.MINUTES,
            new SynchronousQueue<>(), new ThreadPoolExecutor.AbortPolicy());
    }
}
